home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_sharutils.idb / usr / freeware / catman / u_man / cat1 / shar.Z / shar
Encoding:
Text File  |  1998-05-21  |  15.2 KB  |  398 lines

  1. /xlv1/freeware/1998.May/sharutils/4.2/sharutils-4.2.diffbuild/doc
  2.  
  3.  
  4.  
  5.      SSSSHHHHAAAARRRR((((1111))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm    VVVV ((((SSSSeeeepppptttteeeemmmmbbbbeeeerrrr 11110000,,,, 1111999999995555))))           SSSSHHHHAAAARRRR((((1111))))
  6.  
  7.  
  8.  
  9.      NNNNAAAAMMMMEEEE
  10.       shar - create    shell archives
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       shar [ options ] file    ...
  14.       shar -S [ options ]
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.       Shar creates "shell archives"    (or shar files)    which are in
  18.       text format and can be mailed.  These    files may be unpacked
  19.       later    by executing them with /bin/sh.     The resulting archive
  20.       is sent to standard out unless the -_o    option is given.  A
  21.       wide range of    features provide extensive flexibility in
  22.       manufacturing    shars and in specifying    shar "smartness".
  23.       Archives may be "vanilla" or comprehensive.
  24.  
  25.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  26.       Options have a one letter version starting with - or a long
  27.       version starting with    --.  The exception is --_h_e_l_p,
  28.       --_v_e_r_s_i_o_n, --_n_o-_i_1_8_n and --_p_r_i_n_t-_t_e_x_t-_d_o_m_a_i_n-_d_i_r which does
  29.       not have short versions.  Mandatory arguments    to long
  30.       options are mandatory    for short options too.    Options    can be
  31.       given    in any order.  Some options depend on each other:
  32.            The -_o option is    required if the    -_l or -_L option    is used.
  33.            The -_n option is    required if the    -_a option is used.
  34.            See -_V below.
  35.  
  36.     GGGGiiiivvvviiiinnnngggg ffffeeeeeeeeddddbbbbaaaacccckkkk::::
  37.       --_h_e_l_p
  38.            Print a help summary on standard    output,    then
  39.            immediately exits.
  40.  
  41.       --_v_e_r_s_i_o_n
  42.            Print the version number    of the program on standard
  43.            output, then immediately    exits.
  44.  
  45.       -_q --_q_u_i_e_t --_s_i_l_e_n_t
  46.            Do not output verbose messages locally when producing
  47.            the archive.
  48.  
  49.     SSSSeeeelllleeeeccccttttiiiinnnngggg ffffiiiilllleeeessss::::
  50.       -_p  --_i_n_t_e_r_m_i_x-_t_y_p_e
  51.            Allow positional    parameter options.  The    options    -_B,
  52.            -_T, -_z and -_Z may be embedded, and files    to the right
  53.            of the option will be processed in the specified    mode.
  54.  
  55.       -_S  --_s_t_d_i_n-_f_i_l_e-_l_i_s_t
  56.            Read list of files to be    packed from the    standard input
  57.            rather than from    the command line.  Input must be in a
  58.            form similar to that generated by the find command, one
  59.            filename    per line.  This    switch is especially useful
  60.            when the    command    line will not hold the list of files
  61.  
  62.  
  63.  
  64.      Page 1                         (printed 5/18/98)
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.      SSSSHHHHAAAARRRR((((1111))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm    VVVV ((((SSSSeeeepppptttteeeemmmmbbbbeeeerrrr 11110000,,,, 1111999999995555))))           SSSSHHHHAAAARRRR((((1111))))
  72.  
  73.  
  74.  
  75.            to be packed.  For example:
  76.  
  77.            find . -type f -print | sort | shar -S -Z -L50 -o /tmp/big
  78.  
  79.            If -_p is    specified on the command line, then the
  80.            options -_B, -_T, -_z and -_Z may be    included in the
  81.            standard    input (on a line separate from filenames).
  82.            The maximum number of lines of standard input, file
  83.            names and options, may not exceed 1024.
  84.  
  85.     SSSSpppplllliiiittttttttiiiinnnngggg oooouuuuttttppppuuuutttt::::
  86.       -_o XXX  --_o_u_t_p_u_t-_p_r_e_f_i_x=XXX
  87.            Save the    archive    to files XXX.01    thru XXX.nn instead of
  88.            sending it to standard out.  Must be used when the -_l
  89.            or the -_L switches are used.
  90.  
  91.       -_l XX     --_w_h_o_l_e-_s_i_z_e-_l_i_m_i_t=XX
  92.            Limit the output    file size to XXk bytes but don't split
  93.            input files.
  94.  
  95.       -_L XX     --_s_p_l_i_t-_s_i_z_e-_l_i_m_i_t=XX
  96.            Limit output file size to XXk bytes and split files if
  97.            necessary.  The archive parts created with this option
  98.            must be unpacked    in correct order.
  99.  
  100.     CCCCoooonnnnttttrrrroooolllllllliiiinnnngggg tttthhhheeee    sssshhhhaaaarrrr hhhheeeeaaaaddddeeeerrrrssss::::
  101.       -_n name  --_a_r_c_h_i_v_e-_n_a_m_e=name
  102.            Name of archive to be included in the header of the
  103.            shar files.  See    the -_a switch.
  104.  
  105.       -_s who@where    --_s_u_b_m_i_t_t_e_r=who@where
  106.            Override    automatically determined submitter name.
  107.  
  108.       -_a  --_n_e_t-_h_e_a_d_e_r_s
  109.            Allows automatic    generation of headers:
  110.             Submitted-by: who@where
  111.             Archive-name: <name>/part##
  112.            The <name> must be given    with the -_n switch.  If    name
  113.            includes    a '/' "/part" isn't used.  Thus:
  114.             -n xyzzy              produces:
  115.                           xyzzy/part01
  116.                           xyzzy/part02
  117.  
  118.             -n xyzzy/patch          produces:
  119.                           xyzzy/patch01
  120.                           xyzzy/patch02
  121.  
  122.             -n xyzzy/patch01.          produces:
  123.                           xyzzy/patch01.01
  124.                           xyzzy/patch01.02
  125.  
  126.            The who@where can be explicitly stated with the -_s
  127.  
  128.  
  129.  
  130.      Page 2                         (printed 5/18/98)
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.      SSSSHHHHAAAARRRR((((1111))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm    VVVV ((((SSSSeeeepppptttteeeemmmmbbbbeeeerrrr 11110000,,,, 1111999999995555))))           SSSSHHHHAAAARRRR((((1111))))
  138.  
  139.  
  140.  
  141.            switch if the default isn't appropriate.     Who@where is
  142.            essentially built as `whoami`@`uname`.
  143.  
  144.       -_c  --_c_u_t-_m_a_r_k
  145.            Start the shar with a cut line.    A line saying 'Cut
  146.            here' is    placed at the start of each output file.
  147.  
  148.     SSSSeeeelllleeeeccccttttiiiinnnngggg hhhhoooowwww ffffiiiilllleeeessss aaaarrrreeee    ssssttttoooocccckkkkeeeedddd::::
  149.       -_M  --_m_i_x_e_d-_u_u_e_n_c_o_d_e
  150.            Mixed mode.  Determine if the files are text or binary
  151.            and archive correctly (default).     Files found to    be
  152.            binary are uudecoded prior to packing (USE OF UUENCODE
  153.            IS NOT APPRECIATED BY MANY ON THE NET).
  154.  
  155.       -_T  --_t_e_x_t-_f_i_l_e_s
  156.            Treat all files as text.
  157.  
  158.       -_B  --_u_u_e_n_c_o_d_e
  159.            Treat all files as binary, use uuencode prior to
  160.            packing.     This increases    the size of the    archive.  The
  161.            recipient must have uudecode in order to    unpack.     (USE
  162.            OF UUENCODE IS NOT APPRECIATED BY MANY ON THE NET).
  163.  
  164.       -_z  --_g_z_i_p
  165.            Gzip and    uuencode all files prior to packing.  The
  166.            recipient must have uudecode and    gzip in    order to
  167.            unpack (USE OF UUENCODE AND GZIP    IS NOT APPRECIATED BY
  168.            MANY ON THE NET).
  169.  
  170.       -_g LEVEL  --_l_e_v_e_l-_f_o_r-_g_z_i_p=LEVEL
  171.            When doing compression, use '-LEVEL' as a parameter to
  172.            gzip.  Default is 9.  The -_g option turns on the    -_z
  173.            option by default.
  174.  
  175.       -_Z  --_c_o_m_p_r_e_s_s
  176.            Compress    and uuencode all files prior to    packing.  The
  177.            recipient must have uudecode and    compress in order to
  178.            unpack (USE OF UUENCODE AND COMPRESS IS NOT APPRECIATED
  179.            BY MANY ON THE NET).  Option -_C is synonymous to    -_Z,
  180.            but is being deprecated.
  181.  
  182.       -_b BITS  --_b_i_t_s-_p_e_r-_c_o_d_e=BITS
  183.            When doing compression, use '-bBITS' as a parameter to
  184.            compress.  The -_B option    turns on the -_Z    option by
  185.            default.     Default value is 12.
  186.  
  187.     PPPPrrrrooootttteeeeccccttttiiiinnnngggg aaaaggggaaaaiiiinnnnsssstttt ttttrrrraaaannnnssssmmmmiiiissssssssiiiioooonnnn    eeeerrrrrrrroooorrrrssss::::
  188.       -_w  --_n_o-_c_h_a_r_a_c_t_e_r-_c_o_u_n_t
  189.            Do NOT check each file with 'wc -c' after unpack.  The
  190.            default is to check.
  191.  
  192.       -_D  --_n_o-_m_d_5-_d_i_g_e_s_t
  193.  
  194.  
  195.  
  196.      Page 3                         (printed 5/18/98)
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.      SSSSHHHHAAAARRRR((((1111))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm    VVVV ((((SSSSeeeepppptttteeeemmmmbbbbeeeerrrr 11110000,,,, 1111999999995555))))           SSSSHHHHAAAARRRR((((1111))))
  204.  
  205.  
  206.  
  207.            Do NOT use 'md5sum' digest to verify the    unpacked
  208.            files. The default is to    check.
  209.  
  210.       -_F  --_f_o_r_c_e-_p_r_e_f_i_x
  211.            Forces the prefix character (normally 'X' unless    the
  212.            parameter to the    -_d option starts with 'X') to be
  213.            prepended to every line even if not required.  This
  214.            option may slightly increase the    size of    the archive,
  215.            especially if -_B    or -_Z is used.
  216.  
  217.       -_d XXX  --_h_e_r_e-_d_e_l_i_m_i_t_e_r=XXX
  218.            Use XXX to delimit the files in the shar    instead    of
  219.            SHAR_EOF.  This is for those who    want to    personalize
  220.            their shar files.
  221.  
  222.     PPPPrrrroooodddduuuucccciiiinnnngggg ddddiiiiffffffffeeeerrrreeeennnntttt kkkkiiiinnnnddddssss ooooffff sssshhhhaaaarrrrssss::::
  223.       -_V  --_v_a_n_i_l_l_a-_o_p_e_r_a_t_i_o_n
  224.            Produce "vanilla" shars which rely only upon the
  225.            existence of sed    and echo in the    unsharing environment.
  226.            In addition, "if    test" must also    be supported unless
  227.            the -_x option is    used.  The -_V silently disables
  228.            options offensive to the    "network cop" (or "brown
  229.            shirt"),    but does warn you if it    is specified with -_B,
  230.            -_z, -_Z, -_p or -_M    (any of    which does or might require
  231.            uudecode, gzip or compress in the unsharing
  232.            environment).
  233.  
  234.       -_P  --_n_o-_p_i_p_i_n_g
  235.            Use temporary files instead of pipes in the shar    file.
  236.  
  237.       -_x  --_n_o-_c_h_e_c_k-_e_x_i_s_t_i_n_g
  238.            Overwrite existing files    without    checking.  If neither
  239.            -_x nor -_X is specified, the unpack will check for and
  240.            not overwrite existing files when unpacking the
  241.            archive.     If -_c is passed as a parameter    to the script
  242.            when unpacking:
  243.  
  244.             sh archive -c
  245.  
  246.            then existing files will    be overwritten
  247.            unconditionally.
  248.  
  249.       -_X  --_q_u_e_r_y-_u_s_e_r
  250.            When unpacking, interactively ask the user if files
  251.            should be overwritten.  (DO NOT USE FOR SHARS SUBMITTED
  252.            TO THE NET).
  253.  
  254.       -_m  --_n_o-_t_i_m_e_s_t_a_m_p
  255.            Avoid generating    'touch'    commands to restore the    file
  256.            modification dates when unpacking files from the
  257.            archive.
  258.  
  259.  
  260.  
  261.  
  262.      Page 4                         (printed 5/18/98)
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.      SSSSHHHHAAAARRRR((((1111))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm    VVVV ((((SSSSeeeepppptttteeeemmmmbbbbeeeerrrr 11110000,,,, 1111999999995555))))           SSSSHHHHAAAARRRR((((1111))))
  270.  
  271.  
  272.  
  273.       -_Q  --_q_u_i_e_t-_u_n_s_h_a_r
  274.            Verbose OFF.  Disables the inclusion of comments    to be
  275.            output when the archive is unpacked.
  276.  
  277.       -_f  --_b_a_s_e_n_a_m_e
  278.            Restore by filename only, rather    than path.  This
  279.            option causes only file names to    be used, which is
  280.            useful when building a shar from    several    directories,
  281.            or another directory.  Note that    if a directory name is
  282.            passed to shar, the substructure    of that    directory will
  283.            be restored whether -_f is specified or not.
  284.  
  285.     IIIInnnntttteeeerrrrnnnnaaaattttiiiioooonnnnaaaalllliiiizzzzaaaattttiiiioooonnnn::::
  286.       --_n_o-_i_1_8_n
  287.            Do not produce internationalized    shell archives,    use
  288.            default english messages.  By default, shar produces
  289.            archives    that will try to output    messages in the
  290.            unpackers preferred language (as    determined by the
  291.            LANG/LC_MESSAGES    environmental variables) when they are
  292.            unpacked.  If no    message    file for the unpackers
  293.            language    is found at unpack time, messages will be in
  294.            english.
  295.  
  296.       --_p_r_i_n_t-_t_e_x_t-_d_o_m_a_i_n-_d_i_r
  297.            Prints the directory shar looks in to find messages
  298.            files for different languages, then immediately exits.
  299.  
  300.      EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  301.       shar *.c > cprog.shar               # all C prog sources
  302.       shar -Q *.[ch] > cprog.shar           # non-verbose, .c and .h    files
  303.       shar -B -l28 -oarc.sh    *.arc           # all binary .arc files,    into
  304.                            # files arc.sh.01 thru arc.sh.NN
  305.       shar -f /lcl/src/u*.c    > u.sh           # use only the filenames
  306.  
  307.      WWWWAAAARRRRNNNNIIIINNNNGGGGSSSS
  308.       No chmod or touch is ever generated for directories created
  309.       when unpacking.  Thus, if a directory    is given to shar, the
  310.       protection and modification dates of corresponding unpacked
  311.       directory may    not match those    of the original.
  312.  
  313.       If a directory is passed to shar, it may be scanned more
  314.       than once.  Therefore, one should be careful not change the
  315.       directory while shar is running.
  316.  
  317.       Be careful that the output file(s) are not included in the
  318.       inputs or shar may loop until    the disk fills up.  Be
  319.       particularly careful when a directory    is passed to shar that
  320.       the output files are not in that directory (or a
  321.       subdirectory of that directory).
  322.  
  323.       Use of the -_B, -_z or -_Z, and especially -_M, may slow the
  324.       archive process considerably,    depending on the number    of
  325.  
  326.  
  327.  
  328.      Page 5                         (printed 5/18/98)
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.      SSSSHHHHAAAARRRR((((1111))))        UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm    VVVV ((((SSSSeeeepppptttteeeemmmmbbbbeeeerrrr 11110000,,,, 1111999999995555))))           SSSSHHHHAAAARRRR((((1111))))
  336.  
  337.  
  338.  
  339.       files.
  340.  
  341.       Use of -_X produces shars which _W_I_L_L cause problems with many
  342.       unshar procedures.  Use this feature only for    archives to be
  343.       passed among agreeable parties.  Certainly, -_X is NOT    for
  344.       shell    archives which are to be submitted to Usenet.  Usage
  345.       of -_B, -_z or -_Z in net shars will cause you to be flamed off
  346.       the earth.  Not using    -_m or not using    -_F may also get    you
  347.       occasional complaints.
  348.  
  349.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  350.       unshar(1)
  351.  
  352.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  353.       Error    messages for illegal or    incompatible options, for
  354.       non-regular, missing or inaccessible files or    for (unlikely)
  355.       memory allocation failure.
  356.  
  357.      AAAAUUUUTTTTHHHHOOOORRRRSSSS
  358.       The shar and unshar programs is the collective work of many
  359.       authors.  Many people    contributed by reporting problems,
  360.       suggesting various improvements or submitting    actual code.
  361.       A list of these people is in the THANKS file in the
  362.       sharutils distribution.
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.      Page 6                         (printed 5/18/98)
  395.  
  396.  
  397.  
  398.